using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace CLZ.Data
{
	public static class TableBusiness
	{
		public const string Table = "Business";
		public const string BusinessID = "BusinessID";
		public const string RegionID = "RegionID";
		public const string ApproveStatusID = "ApproveStatusID";
		public const string LoginName = "LoginName";
		public const string Password = "Password";
		public const string BusinessName = "BusinessName";
		public const string BusinessNo = "BusinessNo";
		public const string Contact = "Contact";
		public const string IDNO = "IDNO";
		public const string TelePhone = "TelePhone";
		public const string Email = "Email";
		public const string Mobile = "Mobile";
		public const string Fax = "Fax";
		public const string Address = "Address";
		public const string ZipCode = "ZipCode";
		public const string WebSite = "WebSite";
		public const string Introduction = "Introduction";
		public const string Description = "Description";
		public const string LastLogin = "LastLogin";
		public const string Activity = "Activity";
		public const string Creater = "Creater";
		public const string CreatedBy = "CreatedBy";
		public const string Created = "Created";
		public const string Modified = "Modified";
		public const string ModifiedBy = "ModifiedBy";
		public const string ModifiedByID = "ModifiedByID";
		public const string IsTransfer = "IsTransfer";
		public const string AccountNo = "AccountNo";
		public const string AccountName = "AccountName";
		public const string MarketsID = "MarketsID";
		public const string BusinessTypeID = "BusinessTypeID";
		public const string SalesTypeID = "SalesTypeID";
		public const string IsOnline = "IsOnline";
		public const string IsOpenVideo = "IsOpenVideo";
		public const string OnLineDate = "OnLineDate";
		public const string OpenVideoDate = "OpenVideoDate";
		public const string VideoPort = "VideoPort";
		public const string LoginIP = "LoginIP";
		public const string ImageUrl = "ImageUrl";
		public const string RecommendType = "RecommendType";
	}
	
	[Serializable]
	public class BaseBusiness
		: IDbSessionEntity, IJsonClass
	{
		int m_BusinessID;
		/// <summary>
        /// 经营户表ID
        /// </summary>
        public int BusinessID
        {
            get { return m_BusinessID; }
            set { m_BusinessID = value; }
        }
		
		int? m_RegionID;
		/// <summary>
        /// 县/区表ID
        /// </summary>
        public int? RegionID
        {
            get { return m_RegionID; }
            set { m_RegionID = value; }
        }
		
		int m_ApproveStatusID;
		/// <summary>
        /// 审批状态表ID(外键)
        /// </summary>
        public int ApproveStatusID
        {
            get { return m_ApproveStatusID; }
            set { m_ApproveStatusID = value; }
        }
		
		string m_LoginName;
		/// <summary>
        /// 登录名称
        /// </summary>
        public string LoginName
        {
            get { return m_LoginName; }
            set { m_LoginName = value; }
        }
		
		string m_Password;
		/// <summary>
        /// 登录密码
        /// </summary>
        public string Password
        {
            get { return m_Password; }
            set { m_Password = value; }
        }
		
		string m_BusinessName;
		/// <summary>
        /// 摊档名称
        /// </summary>
        public string BusinessName
        {
            get { return m_BusinessName; }
            set { m_BusinessName = value; }
        }
		
		string m_BusinessNo;
		/// <summary>
        /// 经营户编号
        /// </summary>
        public string BusinessNo
        {
            get { return m_BusinessNo; }
            set { m_BusinessNo = value; }
        }
		
		string m_Contact;
		/// <summary>
        /// 联系人（档主）
        /// </summary>
        public string Contact
        {
            get { return m_Contact; }
            set { m_Contact = value; }
        }
		
		string m_IDNO;
		/// <summary>
        /// 证件号
        /// </summary>
        public string IDNO
        {
            get { return m_IDNO; }
            set { m_IDNO = value; }
        }
		
		string m_TelePhone;
		/// <summary>
        /// 联系电话
        /// </summary>
        public string TelePhone
        {
            get { return m_TelePhone; }
            set { m_TelePhone = value; }
        }
		
		string m_Email;
		/// <summary>
        /// 电子邮箱
        /// </summary>
        public string Email
        {
            get { return m_Email; }
            set { m_Email = value; }
        }
		
		string m_Mobile;
		/// <summary>
        /// 手机
        /// </summary>
        public string Mobile
        {
            get { return m_Mobile; }
            set { m_Mobile = value; }
        }
		
		string m_Fax;
		/// <summary>
        /// 传真
        /// </summary>
        public string Fax
        {
            get { return m_Fax; }
            set { m_Fax = value; }
        }
		
		string m_Address;
		/// <summary>
        /// 联系地址
        /// </summary>
        public string Address
        {
            get { return m_Address; }
            set { m_Address = value; }
        }
		
		string m_ZipCode;
		/// <summary>
        /// 邮编
        /// </summary>
        public string ZipCode
        {
            get { return m_ZipCode; }
            set { m_ZipCode = value; }
        }
		
		string m_WebSite;
		/// <summary>
        /// 网址
        /// </summary>
        public string WebSite
        {
            get { return m_WebSite; }
            set { m_WebSite = value; }
        }
		
		string m_Introduction;
		/// <summary>
        /// 经营户简介
        /// </summary>
        public string Introduction
        {
            get { return m_Introduction; }
            set { m_Introduction = value; }
        }
		
		string m_Description;
		/// <summary>
        /// 公司描述
        /// </summary>
        public string Description
        {
            get { return m_Description; }
            set { m_Description = value; }
        }
		
		DateTime? m_LastLogin;
		/// <summary>
        /// 最后登录时间
        /// </summary>
        public DateTime? LastLogin
        {
            get { return m_LastLogin; }
            set { m_LastLogin = value; }
        }
		
		bool m_Activity;
		/// <summary>
        /// 是否激活
        /// </summary>
        public bool Activity
        {
            get { return m_Activity; }
            set { m_Activity = value; }
        }
		
		int m_Creater;
		/// <summary>
        /// 创建人ID
        /// </summary>
        public int Creater
        {
            get { return m_Creater; }
            set { m_Creater = value; }
        }
		
		string m_CreatedBy;
		/// <summary>
        /// 创建人名称
        /// </summary>
        public string CreatedBy
        {
            get { return m_CreatedBy; }
            set { m_CreatedBy = value; }
        }
		
		DateTime m_Created;
		/// <summary>
        /// 创建时间
        /// </summary>
        public DateTime Created
        {
            get { return m_Created; }
            set { m_Created = value; }
        }
		
		DateTime m_Modified;
		/// <summary>
        /// 最后修改时间
        /// </summary>
        public DateTime Modified
        {
            get { return m_Modified; }
            set { m_Modified = value; }
        }
		
		string m_ModifiedBy;
		/// <summary>
        /// 修改人
        /// </summary>
        public string ModifiedBy
        {
            get { return m_ModifiedBy; }
            set { m_ModifiedBy = value; }
        }
		
		int? m_ModifiedByID;
		/// <summary>
        /// 修改人ID
        /// </summary>
        public int? ModifiedByID
        {
            get { return m_ModifiedByID; }
            set { m_ModifiedByID = value; }
        }
		
		bool m_IsTransfer;
		/// <summary>
        /// 是否需要转账
        /// </summary>
        public bool IsTransfer
        {
            get { return m_IsTransfer; }
            set { m_IsTransfer = value; }
        }
		
		string m_AccountNo;
		/// <summary>
        /// 账号
        /// </summary>
        public string AccountNo
        {
            get { return m_AccountNo; }
            set { m_AccountNo = value; }
        }
		
		string m_AccountName;
		/// <summary>
        /// 账号名称
        /// </summary>
        public string AccountName
        {
            get { return m_AccountName; }
            set { m_AccountName = value; }
        }
		
		int? m_MarketsID;
		/// <summary>
        /// 
        /// </summary>
        public int? MarketsID
        {
            get { return m_MarketsID; }
            set { m_MarketsID = value; }
        }
		
		int? m_BusinessTypeID;
		/// <summary>
        /// 
        /// </summary>
        public int? BusinessTypeID
        {
            get { return m_BusinessTypeID; }
            set { m_BusinessTypeID = value; }
        }
		
		int? m_SalesTypeID;
		/// <summary>
        /// 
        /// </summary>
        public int? SalesTypeID
        {
            get { return m_SalesTypeID; }
            set { m_SalesTypeID = value; }
        }
		
		bool m_IsOnline;
		/// <summary>
        /// 
        /// </summary>
        public bool IsOnline
        {
            get { return m_IsOnline; }
            set { m_IsOnline = value; }
        }
		
		bool m_IsOpenVideo;
		/// <summary>
        /// 
        /// </summary>
        public bool IsOpenVideo
        {
            get { return m_IsOpenVideo; }
            set { m_IsOpenVideo = value; }
        }
		
		DateTime? m_OnLineDate;
		/// <summary>
        /// 
        /// </summary>
        public DateTime? OnLineDate
        {
            get { return m_OnLineDate; }
            set { m_OnLineDate = value; }
        }
		
		DateTime? m_OpenVideoDate;
		/// <summary>
        /// 
        /// </summary>
        public DateTime? OpenVideoDate
        {
            get { return m_OpenVideoDate; }
            set { m_OpenVideoDate = value; }
        }
		
		int m_VideoPort;
		/// <summary>
        /// 
        /// </summary>
        public int VideoPort
        {
            get { return m_VideoPort; }
            set { m_VideoPort = value; }
        }
		
		string m_LoginIP;
		/// <summary>
        /// 
        /// </summary>
        public string LoginIP
        {
            get { return m_LoginIP; }
            set { m_LoginIP = value; }
        }
		
		string m_ImageUrl;
		/// <summary>
        /// 
        /// </summary>
        public string ImageUrl
        {
            get { return m_ImageUrl; }
            set { m_ImageUrl = value; }
        }
		
		int m_RecommendType;
		/// <summary>
        /// 
        /// </summary>
        public int RecommendType
        {
            get { return m_RecommendType; }
            set { m_RecommendType = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_BusinessID = reader[TableBusiness.BusinessID];
            m_RegionID = reader[TableBusiness.RegionID];
            m_ApproveStatusID = reader[TableBusiness.ApproveStatusID];
            m_LoginName = reader[TableBusiness.LoginName];
            m_Password = reader[TableBusiness.Password];
            m_BusinessName = reader[TableBusiness.BusinessName];
            m_BusinessNo = reader[TableBusiness.BusinessNo];
            m_Contact = reader[TableBusiness.Contact];
            m_IDNO = reader[TableBusiness.IDNO];
            m_TelePhone = reader[TableBusiness.TelePhone];
            m_Email = reader[TableBusiness.Email];
            m_Mobile = reader[TableBusiness.Mobile];
            m_Fax = reader[TableBusiness.Fax];
            m_Address = reader[TableBusiness.Address];
            m_ZipCode = reader[TableBusiness.ZipCode];
            m_WebSite = reader[TableBusiness.WebSite];
            m_Introduction = reader[TableBusiness.Introduction];
            m_Description = reader[TableBusiness.Description];
            m_LastLogin = reader[TableBusiness.LastLogin];
            m_Activity = reader[TableBusiness.Activity];
            m_Creater = reader[TableBusiness.Creater];
            m_CreatedBy = reader[TableBusiness.CreatedBy];
            m_Created = reader[TableBusiness.Created];
            m_Modified = reader[TableBusiness.Modified];
            m_ModifiedBy = reader[TableBusiness.ModifiedBy];
            m_ModifiedByID = reader[TableBusiness.ModifiedByID];
            m_IsTransfer = reader[TableBusiness.IsTransfer];
            m_AccountNo = reader[TableBusiness.AccountNo];
            m_AccountName = reader[TableBusiness.AccountName];
            m_MarketsID = reader[TableBusiness.MarketsID];
            m_BusinessTypeID = reader[TableBusiness.BusinessTypeID];
            m_SalesTypeID = reader[TableBusiness.SalesTypeID];
            m_IsOnline = reader[TableBusiness.IsOnline];
            m_IsOpenVideo = reader[TableBusiness.IsOpenVideo];
            m_OnLineDate = reader[TableBusiness.OnLineDate];
            m_OpenVideoDate = reader[TableBusiness.OpenVideoDate];
            m_VideoPort = reader[TableBusiness.VideoPort];
            m_LoginIP = reader[TableBusiness.LoginIP];
            m_ImageUrl = reader[TableBusiness.ImageUrl];
            m_RecommendType = reader[TableBusiness.RecommendType];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
            writer.SetPrimaryKey(TableBusiness.BusinessID, PrimaryKeyType.Identity, BusinessID);
			writer[TableBusiness.RegionID] = RegionID;
			writer[TableBusiness.ApproveStatusID] = ApproveStatusID;
			writer[TableBusiness.LoginName] = LoginName;
			writer[TableBusiness.Password] = Password;
			writer[TableBusiness.BusinessName] = BusinessName;
			writer[TableBusiness.BusinessNo] = BusinessNo;
			writer[TableBusiness.Contact] = Contact;
			writer[TableBusiness.IDNO] = IDNO;
			writer[TableBusiness.TelePhone] = TelePhone;
			writer[TableBusiness.Email] = Email;
			writer[TableBusiness.Mobile] = Mobile;
			writer[TableBusiness.Fax] = Fax;
			writer[TableBusiness.Address] = Address;
			writer[TableBusiness.ZipCode] = ZipCode;
			writer[TableBusiness.WebSite] = WebSite;
			writer[TableBusiness.Introduction] = Introduction;
			writer[TableBusiness.Description] = Description;
			writer[TableBusiness.LastLogin] = LastLogin;
			writer[TableBusiness.Activity] = Activity;
			writer[TableBusiness.Creater] = Creater;
			writer[TableBusiness.CreatedBy] = CreatedBy;
			writer[TableBusiness.Created] = Created;
			writer[TableBusiness.Modified] = Modified;
			writer[TableBusiness.ModifiedBy] = ModifiedBy;
			writer[TableBusiness.ModifiedByID] = ModifiedByID;
			writer[TableBusiness.IsTransfer] = IsTransfer;
			writer[TableBusiness.AccountNo] = AccountNo;
			writer[TableBusiness.AccountName] = AccountName;
			writer[TableBusiness.MarketsID] = MarketsID;
			writer[TableBusiness.BusinessTypeID] = BusinessTypeID;
			writer[TableBusiness.SalesTypeID] = SalesTypeID;
			writer[TableBusiness.IsOnline] = IsOnline;
			writer[TableBusiness.IsOpenVideo] = IsOpenVideo;
			writer[TableBusiness.OnLineDate] = OnLineDate;
			writer[TableBusiness.OpenVideoDate] = OpenVideoDate;
			writer[TableBusiness.VideoPort] = VideoPort;
			writer[TableBusiness.LoginIP] = LoginIP;
			writer[TableBusiness.ImageUrl] = ImageUrl;
			writer[TableBusiness.RecommendType] = RecommendType;
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
            m_BusinessID = idd;
        }
		
		public string TableName
        {
            get { return TableBusiness.Table; }
        }
		#endregion
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_BusinessID = hashToRead["BusinessID"];
			 
             m_RegionID = hashToRead["RegionID"];
			 
             m_ApproveStatusID = hashToRead["ApproveStatusID"];
			 
             m_LoginName = hashToRead["LoginName"];
			 
             m_Password = hashToRead["Password"];
			 
             m_BusinessName = hashToRead["BusinessName"];
			 
             m_BusinessNo = hashToRead["BusinessNo"];
			 
             m_Contact = hashToRead["Contact"];
			 
             m_IDNO = hashToRead["IDNO"];
			 
             m_TelePhone = hashToRead["TelePhone"];
			 
             m_Email = hashToRead["Email"];
			 
             m_Mobile = hashToRead["Mobile"];
			 
             m_Fax = hashToRead["Fax"];
			 
             m_Address = hashToRead["Address"];
			 
             m_ZipCode = hashToRead["ZipCode"];
			 
             m_WebSite = hashToRead["WebSite"];
			 
             m_Introduction = hashToRead["Introduction"];
			 
             m_Description = hashToRead["Description"];
			 
             m_LastLogin = hashToRead["LastLogin"];
			 
             m_Activity = hashToRead["Activity"];
			 
             m_Creater = hashToRead["Creater"];
			 
             m_CreatedBy = hashToRead["CreatedBy"];
			 
             m_Created = hashToRead["Created"];
			 
             m_Modified = hashToRead["Modified"];
			 
             m_ModifiedBy = hashToRead["ModifiedBy"];
			 
             m_ModifiedByID = hashToRead["ModifiedByID"];
			 
             m_IsTransfer = hashToRead["IsTransfer"];
			 
             m_AccountNo = hashToRead["AccountNo"];
			 
             m_AccountName = hashToRead["AccountName"];
			 
             m_MarketsID = hashToRead["MarketsID"];
			 
             m_BusinessTypeID = hashToRead["BusinessTypeID"];
			 
             m_SalesTypeID = hashToRead["SalesTypeID"];
			 
             m_IsOnline = hashToRead["IsOnline"];
			 
             m_IsOpenVideo = hashToRead["IsOpenVideo"];
			 
             m_OnLineDate = hashToRead["OnLineDate"];
			 
             m_OpenVideoDate = hashToRead["OpenVideoDate"];
			 
             m_VideoPort = hashToRead["VideoPort"];
			 
             m_LoginIP = hashToRead["LoginIP"];
			 
             m_ImageUrl = hashToRead["ImageUrl"];
			 
             m_RecommendType = hashToRead["RecommendType"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["BusinessID"] = BusinessID;
			 
            hashToFill["RegionID"] = RegionID;
			 
            hashToFill["ApproveStatusID"] = ApproveStatusID;
			 
            hashToFill["LoginName"] = LoginName;
			 
            hashToFill["Password"] = Password;
			 
            hashToFill["BusinessName"] = BusinessName;
			 
            hashToFill["BusinessNo"] = BusinessNo;
			 
            hashToFill["Contact"] = Contact;
			 
            hashToFill["IDNO"] = IDNO;
			 
            hashToFill["TelePhone"] = TelePhone;
			 
            hashToFill["Email"] = Email;
			 
            hashToFill["Mobile"] = Mobile;
			 
            hashToFill["Fax"] = Fax;
			 
            hashToFill["Address"] = Address;
			 
            hashToFill["ZipCode"] = ZipCode;
			 
            hashToFill["WebSite"] = WebSite;
			 
            hashToFill["Introduction"] = Introduction;
			 
            hashToFill["Description"] = Description;
			 
            hashToFill["LastLogin"] = LastLogin;
			 
            hashToFill["Activity"] = Activity;
			 
            hashToFill["Creater"] = Creater;
			 
            hashToFill["CreatedBy"] = CreatedBy;
			 
            hashToFill["Created"] = Created;
			 
            hashToFill["Modified"] = Modified;
			 
            hashToFill["ModifiedBy"] = ModifiedBy;
			 
            hashToFill["ModifiedByID"] = ModifiedByID;
			 
            hashToFill["IsTransfer"] = IsTransfer;
			 
            hashToFill["AccountNo"] = AccountNo;
			 
            hashToFill["AccountName"] = AccountName;
			 
            hashToFill["MarketsID"] = MarketsID;
			 
            hashToFill["BusinessTypeID"] = BusinessTypeID;
			 
            hashToFill["SalesTypeID"] = SalesTypeID;
			 
            hashToFill["IsOnline"] = IsOnline;
			 
            hashToFill["IsOpenVideo"] = IsOpenVideo;
			 
            hashToFill["OnLineDate"] = OnLineDate;
			 
            hashToFill["OpenVideoDate"] = OpenVideoDate;
			 
            hashToFill["VideoPort"] = VideoPort;
			 
            hashToFill["LoginIP"] = LoginIP;
			 
            hashToFill["ImageUrl"] = ImageUrl;
			 
            hashToFill["RecommendType"] = RecommendType;
			 
        }

        #endregion
		
	}
}
